package com.ruoyi.system.domain;

import java.util.Date;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.annotation.Excel.ColumnType;
import com.ruoyi.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * MBTI答题记录对象 mbti_answer
 * 
 * @author ruoyi
 * @date 2025-01-21
 */
public class MbtiAnswer extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 答题记录ID */
    @Excel(name = "答题记录ID", cellType = ColumnType.NUMERIC)
    private Long answerId;

    /** 测试记录ID */
    @Excel(name = "测试记录ID", cellType = ColumnType.NUMERIC)
    @NotNull(message = "测试记录ID不能为空")
    private Long recordId;

    /** 题目ID */
    @Excel(name = "题目ID", cellType = ColumnType.NUMERIC)
    @NotNull(message = "题目ID不能为空")
    private Long questionId;

    /** 选项ID */
    @Excel(name = "选项ID", cellType = ColumnType.NUMERIC)
    @NotNull(message = "选项ID不能为空")
    private Long optionId;

    /** 答案值 */
    @Excel(name = "答案值")
    @NotBlank(message = "答案值不能为空")
    @Size(min = 0, max = 10, message = "答案值不能超过10个字符")
    private String answerValue;

    /** 得分 */
    @Excel(name = "得分", cellType = ColumnType.NUMERIC)
    @NotNull(message = "得分不能为空")
    private Integer score;

    /** 答题时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "答题时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @NotNull(message = "答题时间不能为空")
    private Date answerTime;

    public void setAnswerId(Long answerId) 
    {
        this.answerId = answerId;
    }

    public Long getAnswerId() 
    {
        return answerId;
    }

    public void setRecordId(Long recordId) 
    {
        this.recordId = recordId;
    }

    public Long getRecordId() 
    {
        return recordId;
    }

    public void setQuestionId(Long questionId) 
    {
        this.questionId = questionId;
    }

    public Long getQuestionId() 
    {
        return questionId;
    }

    public void setOptionId(Long optionId) 
    {
        this.optionId = optionId;
    }

    public Long getOptionId() 
    {
        return optionId;
    }

    public void setAnswerValue(String answerValue) 
    {
        this.answerValue = answerValue;
    }

    public String getAnswerValue() 
    {
        return answerValue;
    }

    public void setScore(Integer score) 
    {
        this.score = score;
    }

    public Integer getScore() 
    {
        return score;
    }

    public void setAnswerTime(Date answerTime) 
    {
        this.answerTime = answerTime;
    }

    public Date getAnswerTime() 
    {
        return answerTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("answerId", getAnswerId())
            .append("recordId", getRecordId())
            .append("questionId", getQuestionId())
            .append("optionId", getOptionId())
            .append("answerValue", getAnswerValue())
            .append("score", getScore())
            .append("answerTime", getAnswerTime())
            .toString();
    }
}
